* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  /* width: 100px; */
  display: flex;
  background: black;
}

.box {
  width: 300px;
  height: 300px;
  position: relative;
  margin: auto;
  animation: animate 4s linear infinite;
  transform-style: preserve-3d;

}

/* 大盒子旋转动画 */
@keyframes animate {
  0% {
    transform: rotateX(-30deg) rotateY(0deg);
    /* transform: ; */
  }

  100% {
    transform: rotateX(-30deg) rotateY(360deg);
    /* transform: ; */
  }
}

/* 顶部加盖子 */
.top {
  width: 100%;
  height: 100%;
  background-color: #051515;
  transform: rotateX(90deg) translateZ(150px);
  transform-style: preserve-3d;
}

/* 灯下效果 */
.top::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: red;
  transform: translateZ(-450px);
  /* 模糊效果 */
  filter: blur(20px);
  box-shadow: 0 0 120px 50px red;
}

.box .contain {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
}

.box .contain span {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(#051515, red);
  transform: rotateY(calc(90deg * var(--i))) translateZ(150px);
  justify-content: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.box .contain span b {
  color: aqua;
  filter: drop-shadow(0 0 50px aqua);
  font-size: 150px;
}